using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class admin_webparts_Plug_ins_Files_Default : System.Web.UI.UserControl
{
    protected void Page_Load(object sender, EventArgs e)
    {
        string action = Request.QueryString["action"];
        string controlName = null;
        if (action != null)
        {
            if (action.Equals("createdir", StringComparison.OrdinalIgnoreCase))
            {
                controlName = "CreateDir.ascx";
            }
            else if (action.Equals("addfile", StringComparison.OrdinalIgnoreCase))
            {
                controlName = "UploadFile.ascx";
            }
            else if (action.Equals("renamedir", StringComparison.OrdinalIgnoreCase))
            {
                controlName = "RenameItem.ascx";
            }
            else if (action.Equals("copydir", StringComparison.OrdinalIgnoreCase))
            {
                controlName = "MoveItem.ascx";
            }
            else if (action.Equals("movedir", StringComparison.OrdinalIgnoreCase))
            {
                controlName = "MoveItem.ascx";
            }
            else if (action.Equals("deletedir", StringComparison.OrdinalIgnoreCase))
            {
                controlName = "DeleteItem.ascx";
            }
            else if (action.Equals("renamefile", StringComparison.OrdinalIgnoreCase))
            {
                controlName = "RenameItem.ascx";
            }
            else if (action.Equals("copyfile", StringComparison.OrdinalIgnoreCase))
            {
                controlName = "MoveItem.ascx";
            }
            else if (action.Equals("movefile", StringComparison.OrdinalIgnoreCase))
            {
                controlName = "MoveItem.ascx";
            }
            else if (action.Equals("deletefile", StringComparison.OrdinalIgnoreCase))
            {
                controlName = "DeleteItem.ascx";
            }
            else if (action.Equals("resize", StringComparison.OrdinalIgnoreCase))
            {
                controlName = "ResizeImage.ascx";
            }
            else
            {
                controlName = "Explorer.ascx";
            }
        }
        else
        {
            controlName = "Explorer.ascx";
        }

        if (controlName != null)
        {
            Control ctrl = LoadControl(controlName);
            this.Controls.Add(ctrl);
        }
    }
}
